package com.itany.corejava.day09;

import com.itany.corejava.day06.Person;

public class TestGeneric<E,C,T extends Number> {

    private E e;
    private T t;


    //泛型方法
    public static <A> A func(A p){
        return null;
    }



    public T f(E e){
        return null;
    }

    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
    }

    public E getE(){
        return e;
    }

    public void setE(E e){
        this.e=e;
    }

    public static void fn(TestGeneric tg){
        tg=new TestGeneric<Integer,String,Double>();
    }

    public static void fun(TestGeneric<? extends Number,? super Number,?> tg){

    }

    public static void main(String[] args) {
        TestGeneric<String,String,Integer> t=new TestGeneric<String,String,Integer>();

//        TestGeneric<Double,String> t2=new TestGeneric<>();
//        Double d=t2.getE();

        fn(t);

        TestGeneric<Integer,Object,Integer> tg=new TestGeneric<>();
        fun(tg);






        String s=func("abc");

        Integer i=func(1);

        Person p=func(new Person());






















    }


}
